@echo off
set ProjName=bdfbase
echo Ready to Start.

echo Step 1: Compiling Library
cd bdfbase
cd acs
..\..\acc bdflib.acs bdflib.o
if exist .\acc.err goto ERROR
echo Done compiling library.
cd ..\

echo Step 2: Packing base
echo Packing Base...
cd bdf2base
..\7z a -r -ssw -tzip ..\%ProjName%n.pk3 "*" -x!*.bak -xr!.svn -xr!hires -x!*.wad.backup* -x!Thumbs.db
echo Done packing.

echo Step 3: Replace old version
echo Replacing old version.
cd ..
del %ProjName%.pk3
ren %ProjName%n.pk3 %ProjName%.pk3
echo Done replacing.

echo Done.
pause
goto DONE

:ERROR
echo Error Compiling ACC Library bdflib.acs
type .\acc.err
:DONE